﻿using Splat;

namespace LS.Screening.UI.Common
{
    public class AppConfig : FileConfig<AppConfig>
    {
        /// <summary>
        /// 系统标识
        /// </summary>
        public string SystemCode { get; set; } = "LS.Screening";

        /// <summary>
        /// 系统名称
        /// </summary>
        public string SystemName { get; set; } = "筛查系统";

        /// <summary>
        /// 应用类型
        /// </summary>
        public AppType AppType { get; set; } = AppType.Desktop;

        /// <summary>
        /// 加密Key
        /// </summary>
        public string CrypKey { get; set; } = "LS.SSINNL";

        /// <summary>
        /// FilePath
        /// </summary>
        public string FilePath { get; set; } = "Files";

        /// <summary>
        /// 当前运行位置
        /// </summary>
        public RunLocation RunLocation { get; set; } = RunLocation.Local;

        /// <summary>
        /// 数据传输是否要压缩
        /// </summary>
        public bool DataCompress { get; set; } = false;

        /// <summary>
        /// 服务地址
        /// </summary>
        public string ServerUrl { get; set; }

        /// <summary>
        /// 用户登录后，在缓存中保存Token的缓存集合名称
        /// </summary>
        public string TokenName { get; set; } = "token";

        /// <summary>
        /// 是否多组织架构
        /// </summary>
        public bool MutilOrganization { get; set; } = true;

        /// <summary>
        /// 日志记录最小级别
        /// </summary>
        public LogLevel LogMinLevel { get; set; } = LogLevel.Info;

        /// <summary>
        /// 认证登录超时时间(分钟)
        /// </summary>
        public int LoginExpireTo { get; set; } = 30;
    }
}
